package com.alpha.eceasy.mall.service.impl;

import com.alpha.eceasy.extension.BaseServiceImpl;
import com.alpha.eceasy.mall.service.MallCommodityDetailService;
import com.alpha.eceasy.mall.api.entity.MallCommodityDetail;
import com.alpha.eceasy.mall.mapper.MallCommodityDetailMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.io.Serializable;

@Service
@AllArgsConstructor
public class MallCommodityDetailServiceImpl extends BaseServiceImpl<MallCommodityDetailMapper, MallCommodityDetail> implements MallCommodityDetailService {
    @Override
    public MallCommodityDetail getByCommodityGuid(Serializable guid) {
        return baseMapper.selectOne(Wrappers.<MallCommodityDetail>lambdaQuery()
                .eq(MallCommodityDetail::getCommodityGuid, guid), false);
    }
}
